package com.lktx.bbfactory.common.gantt;

import com.lktx.bbfactory.entiy.DTO.GanttConfigDto;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;

@Getter
@AllArgsConstructor
public enum GanttStatusLr {
    PROJECT_INITIATION(1, "立项"),
    MATERIAL_PREPARATION(2, "材料准备"),
    Tooling_Preparation(3, "工装准备"),
    Test_Tuning(4, "试验调试"),
    Test(5, "试验"),
    SHIPPING(6, "发货"),
    Test_Report(7, "试验报告");
    private final Integer id;
    private final String name;
    public static List<GanttConfigDto> getGanttTemplate() {
        return Arrays.stream(GanttStatusLr.values()).sorted(Comparator.comparingInt(GanttStatusLr::getId)).map(k-> new GanttConfigDto(k.id, k.getName(), new ArrayList<>())).toList();
    }
}
